const express = require('./express');
const app = express();
app.get('/', function (req, res, next) { // 路由的中间件
    console.log(1);
    next();
}, function (req, res, next) {
    console.log(11);
    next();
}, function (req, res, next) {
    console.log(111);
    next();
})
app.get('/', function (req, res) {
    console.log(2);
    res.end('home end');
})
app.post('/', function (req, res) {
    console.log(2);
    res.end('post home');
})
/* app.route('/').get(function (req, res) {// 只有一层
    res.end('get /')
}).post(function () {

}) */

app.listen(3000); 